home comics writing pictures archive about

Echo2SIOInt.asm

Language: 8080 Assembly
Last Modified: 2022-11-15 1:50:54 AM UTC
File Size: 1055 bytes
http://www.penguinstew.ca/example/AltairSerialEcho/Echo2SIOInt.asm
; Read 2SIO status register
ORG 0000H
LXI SP, 0100H ; 0000: 31 00 01 Initalize stack pointer
MVI A, 03H ; 0003: 3E 03
OUT 10H ; 0005: D3 10 Rest 2SIO port
MVI A, 95H ; 0007: 3E 95
OUT 10H ; 0009: D3 10 Set 2SIO port to 8n1, enable 2SIO interupts
EI ; 000B: FB Enable CPU interupts
LOOP: NOP ; 000C: 00
NOP ; 000D: 00
NOP ; 000E: 00
JMP LOOP ; 000F: C3 0C 00 Program loop
ORG 0038H ; Interupt Handler
PUSH A ; 0038: F5 Save value of accumulator and PSW
IN 11H ; 0039: DB 11
OUT 11H ; 003B: D3 11 Echo value
POP A ; 003D: F1 Restore accumulator and PSW
EI ; 003E: FB Renable interupts
RET ; 003F: C9 return
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19